package com.csu.mypetstore.api.service;

import com.csu.mypetstore.api.common.CommonResponse;
import com.csu.mypetstore.api.entity.Cartmessage;
import com.csu.mypetstore.api.entity.Item;
import com.csu.mypetstore.api.vo.CartmessageVO;

import java.util.List;

public interface CartService {

    CommonResponse<List<CartmessageVO>> getCartByUsername(String username);

    List<CartmessageVO> getCartByUsername1(String username);

    CommonResponse<Boolean> insertCart(CartmessageVO cartmessageVO);

    CommonResponse<Boolean> updateCart(CartmessageVO cartmessageVO);

    CommonResponse<Boolean> removeCartByCartId(String CartId);

    CommonResponse<Boolean> removeCartByCartId1(int CartId);

    CommonResponse<Boolean> removeCart(CartmessageVO cartmessageVO);

    public Cartmessage selectCartItemByCartId(String cartId);

    public CartmessageVO cartmessageToCartmessageVO(Cartmessage cartmessage, Item item);

    public Item selectItemById(String itemID);
}
